import 'package:json_annotation/json_annotation.dart';

part 'history_today_model.g.dart';

@JsonSerializable()
class HistoryTodayModel {
  final String? code;
  final String? day;
  final List<Result>? result;

  const HistoryTodayModel({
    this.code,
    this.day,
    this.result,
  });

  factory HistoryTodayModel.fromJson(Map<String, dynamic> json) =>
      _$HistoryTodayModelFromJson(json);

  Map<String, dynamic> toJson() => _$HistoryTodayModelToJson(this);
}

@JsonSerializable()
class Result {
  final String? date;
  final String? title;

  const Result({
    this.date,
    this.title,
  });

  factory Result.fromJson(Map<String, dynamic> json) =>
      _$ResultFromJson(json);

  Map<String, dynamic> toJson() => _$ResultToJson(this);
}
